package com.xindacloud.sms.console.system.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xindacloud.sms.console.result.Result;
import com.xindacloud.sms.console.system.dto.SmsApiResParamDTO;
import com.xindacloud.sms.console.system.entity.SmsApiResParam;
import com.xindacloud.sms.console.system.service.ISmsApiResParamService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author czc
 * @since 2019-11-28
 */
@Api(tags = {"Api文档响应参数模块"})
@RestController
@RequestMapping("/api/v1/sms-api-res-param")
public class SmsApiResParamController {

	@Autowired
	private ISmsApiResParamService smsApiResParamService;

	@ApiOperation(value = "获取Api文档请求参数类别",response=SmsApiResParam.class)
	@PostMapping(value = "/getSmsApiResParamList")
	public Result getSmsApiResParamList(@RequestBody SmsApiResParamDTO smsApiResParamDTO) {
	    return smsApiResParamService.getSmsApiResParamList(smsApiResParamDTO);
	}
	
	@ApiOperation(value = "保存或修改Api文档请求参数类别",response=SmsApiResParam.class)
	@PostMapping(value = "/saveOrUpdateSmsApiResParam")
	public Result saveOrUpdateSmsApiResParam(@RequestBody SmsApiResParamDTO smsApiResParamDTO) {
	    return smsApiResParamService.saveOrUpdateSmsApiResParam(smsApiResParamDTO);
	}
	
	@ApiOperation(value = "删除Api文档请求参数类别",response=SmsApiResParam.class)
	@PostMapping(value = "/deleteSmsApiResParam")
	public Result deleteSmsApiResParam(@RequestBody SmsApiResParamDTO smsApiResParamDTO) {
	    return smsApiResParamService.deleteSmsApiResParam(smsApiResParamDTO);
	}


}
